#include <cstdio>
#include <boost/thread.hpp>
// #include <boost>

using namespace boost;
using namespace std;

int g_Int = 0;

void Count_0()
{
	//this_thread::sleep( posix_time::seconds(1) );
	printf("Func Count_0 : \n");
	for (int i = 0; i < 20 ; ++i)
	{
		g_Int += 2;
		printf("After Count_0 Result gInt : %d\n", g_Int);
	}
	printf("End Func Count_0 : \n");
}

void Count_1()
{
	printf("Func Count_1 : \n");
	for (int i = 0; i < 20 ; ++i)
	{
		g_Int += 3;
		printf("After Count_1 Result gInt : %d\n", g_Int);
	}
	printf("End Func Count_1 : \n");
}

int main(int argc, char** argv)
{
	//mutex 
	printf("%d\n", g_Int);
	thread t1( Count_0 );
	thread t2( Count_1 );

	this_thread::sleep( posix_time::seconds(2) );
}